import React, { Component } from "react";
import ReactDOM from "react-dom";
import "./static/style/app.css";
import RootRouter from "./router/index";
import { Provider } from "react-redux";
import store from "./store";
import { persistor } from "./store";
import { PersistGate } from "redux-persist/lib/integration/react";
import { getData, $post, $get, $httpAll } from "./service";
Component.prototype.$post = $post;
Component.prototype.$get = $get;
Component.prototype.$httpAll = $httpAll;
Component.prototype.getData = getData;
ReactDOM.render(
  <Provider store={store}>
    <PersistGate loading={null} persistor={persistor}>
      <RootRouter />
    </PersistGate>
  </Provider>,
  document.getElementById("root")
);
